import request from '@/common/request'

// 供应商列表
export function listByStallId () {
    return request({
        url: '/supplier-management/listByStallId',
        method: 'get'
    })
}
// 供应商商品列表
export function materialListBySupplierId (supplierId) {
    return request({
        url: `/supplier-material-management/listBySupplierId/${supplierId}`,
        method: 'get'
    })
}

// 当前档口

export function getStallApi (params) {
    return request({
        url: '/stall/get',
        method: 'get',
        params: params
    })
}
// 填报  申报
export function addStallReportApi (params) {
    return request({
        url: '/stall-report/add',
        method: 'post',
        data: params
    })
}

// 申报记录
// 周
export function weekReportStallApi (params) {
    return request({
        url: '/stall/weekReportSta',
        method: 'get',
        params: params
    })
}
// 月
export function monthReportStallApi (params) {
    return request({
        url: '/stall/monthReportSta',
        method: 'get',
        params: params
    })
}
// 年
export function yearReportStallApi (params) {
    return request({
        url: '/stall/yearReportSta',
        method: 'get',
        params: params
    })
}
// 今日填报
// /stall/todayReport
export function stallTodayReportApi (params) {
    return request({
        url: '/stall/todayReport',
        method: 'get',
        params: params
    })
}
// 档口 某天名
// http://localhost:8088/stall/dateReport?date=2025-01-27
export function stallDateReportApi (params) {
    return request({
        url: '/stall/dateReport',
        method: 'get',
        params: params
    })
}
// 今日菜品留存记录
export function todayDishSampleListApi (params) {
    return request({
        url: '/dishSample/todayList',
        method: 'get',
        params: params
    })
}

// 七日内留存菜品信息
export function sevenDishSampleListApi (params) {
    return request({
        url: 'dishSample/sevenList',
        method: 'get',
        params: params
    })
}
// 新增菜品留存
export function addDishSampleApi (params) {
    return request({
        url: '/dishSample/add',
        method: 'post',
        data: params
    })
}

// 菜品列表
export function getListByNameApi (params) {
    return request({
        url: '/dishSample/getListByName',
        method: 'get',
        params: params
    })
}

// 近期填报信息
export function getOneByNameApi (params) {
    return request({
        url: '/dishSample/getOneByName',
        method: 'get',
        params: params
    })
}

// 更新数据
export function updateDishSampleApi (data) {
    return request({
        url: '/dishSample/update',
        method: 'post',
        data: data
    })
}
// 获取商品详情

export function getDishSampleByIdApi (id) {
    return request({
        url: `/dishSample/getById/${id}`,
        method: 'get'
        // data: data
    })
}
// 删除
export function deleteDishSampleApi (dishId) {
    return request({
        url: `/dishSample/delete/${dishId}`,
        method: 'get'
    })
}
